// Person.h
#include <iostream>
#include <string>
using namespace std;

class Person
{
public:
    Person() { cout << "Person::Person()" << endl; }
    virtual ~Person() { cout << "Person::~Person()" << endl; }
    void setName(const string &name) { cout << "Person::setName()" << endl; }
    string getName() const { return name; }
    void setAge(int age) {}
    int getAge() const {}
    
protected:
    string name;
private:
    int age;
};

class Student : public Person
{
public:
    Student() { cout << "Student::Student()" << endl; }
    ~Student() { cout << "Student::~Student()" << endl; }
    void setId(int id) {}
    int getId() const { return id; }

private:
    int id;
};

int main()
{
    Person *p = new Student;
    delete p;
    p = nullptr;
    return 0;
}